PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


DrawThemeMenuTitle

Draws a menu title.

pascal OSStatus DrawThemeMenuTitle (
                     const Rect *inMenuBarRect,
                     const Rect *inTitleRect,
                     ThemeMenuState inState,
                     UInt32 inAttributes,
                     MenuTitleDrawingUPP inTitleProc,
                     UInt32 inTitleData);
inMenuBarRect
A pointer to a structure of type Rect . Before calling DrawThemeMenuTitle , set the rectangle to contain the entire menu bar in which the title is to be drawn, in global coordinates. The menu bar background is drawn in the rectangle passed in the inMenuBarRect parameter. Your application can call GetThemeMenuBarHeight to get the height of the menu bar.
inTitleRect
A pointer to a structure of type Rect . Before calling DrawThemeMenuTitle , set the rectangle to contain the menu title, in global coordinates. The title background is drawn in the rectangle passed in the inTitleRect parameter. The width of this rectangle is determined by calculating the width of the menu title's content and then calling GetThemeMenuTitleExtra to get the amount of padding between menu titles in the current theme; these two values are added together and added to the left edge of where the title should be drawn. The top and bottom coordinates of this rectangle should be the same as those of the inMenuBarRect parameter.
inState
A value of type ThemeMenuState . Pass a constant specifying the state (active, selected, or disabled) in which to draw the menu title; see Theme Menu State Constants .
inAttributes
Reserved. Pass 0.
inTitleProc
A value of type MenuTitleDrawingUPP . Pass a universal procedure pointer to a menu title drawing function such as MyMenuTitleDrawingProc , defining how to draw the contents of the menu title. The value of the inTitleProc parameter can be a valid universal procedure pointer or NULL .
inTitleData
An unsigned 32-bit integer. Provide any data to be passed in to the inUserData parameter of MyMenuTitleDrawingProc .
function result
A result code; see Result Codes .
DISCUSSION

The DrawThemeMenuTitle function draws a theme-compliant menu title.

VERSION NOTES

Available with Appearance Manager 1.0.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)